import {
	createRouter,
	createWebHashHistory,
	createWebHistory
} from 'vue-router'
import Layout from '@/views/Layout/index.vue'
import Home from '@/views/Home/index.vue'
import Account from '@/views/account/Index.vue'
import DomainBuyer from '@/views/domainTrade/DomainBuyer.vue'
import DomainOrder from '@/views/domainTrade/DomainOrder.vue'
import DomainSeller from '@/views/domainTrade/DomainSeller.vue'
import DnsResolution from '@/views/domainAdmin/DnsResolution.vue'
import DomainPush from '@/views/domainAdmin/DomainPush.vue'
import DomainTransfer from '@/views/domainAdmin/DomainTransfer.vue'
import MyDomains from '@/views/domainAdmin/MyDomains.vue'
import DomainsDetails from '@/views/domainAdmin/DomainsDetails.vue'
import Template from '@/views/domainAdmin/Template.vue'
import TemplateDetails from '@/views/domainAdmin/TemplateDetails.vue'
import DomainBooking from '@/views/booking/DomainBooking.vue'
import DomainBookingRemind from '@/views/booking/DomainBookingRemind.vue'
import DomainBidding from '@/views/booking/DomainBidding.vue'
import AccountInfo from '@/views/finance/Account.vue'
import Invoice from '@/views/finance/Invoice.vue'
import MyOrder from '@/views/finance/MyOrder.vue'
import OrderDetails from '@/views/finance/OrderDetails.vue'
const router = createRouter({
	history: createWebHashHistory(import.meta.env.BASE_URL),
	routes: [{
		path: '/',
		component: Layout,
		redirect: '/account',
		children: [{
				path: '/account',
				component: Account
			},
			{
				path: '/home',
				component: Home
			},
			// 财务
			{
				path: '/account-info',
				component: AccountInfo
			},
			{
				path: '/invoice',
				component: Invoice
			},
			{
				path: '/my-order',
				component: MyOrder
			},
			{
				path: '/order-details',
				component: OrderDetails
			},
			// 预订竞价
			{
				path: '/domain-booking',
				component: DomainBooking
			},
			{
				path: '/domain-booking-remind',
				component: DomainBookingRemind
			},
			{
				path: '/domain-bidding',
				component: DomainBidding
			},
			// 域名管理
			{
				path: '/template',
				component: Template
			}, {
				path: '/template-details',
				component: TemplateDetails
			}, {
				path: '/domain-transfer',
				component: DomainTransfer
			}, {
				path: '/domain-push',
				component: DomainPush
			}, {
				path: '/dns-resolution',
				component: DnsResolution
			}, {
				path: '/my-domains',
				component: MyDomains
			}, {
				path: '/my-domains-details',
				component: DomainsDetails
			},
			// 域名交易
			{
				path: '/domain-order',
				component: DomainOrder
			},
			{
				path: '/domain-buyer',
				component: DomainBuyer
			},
			{
				path: '/domain-seller',
				component: DomainSeller
			}
		]
	}]
})

export default router